package com.tuo51.evaluate.repositories;

import com.tuo51.evaluate.domain.etc.MailRecord;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface MailRecordRepository extends JpaRepository<MailRecord, String>, JpaSpecificationExecutor<MailRecord> {

    Page<MailRecord> findAllByStaffIdOrderByCreatedDesc(String staffId, Pageable pageable);

    Page<MailRecord> findAllByOrderByCreatedDesc(Pageable pageable);

}
